/**
 * Copyright (c) 2005 - 2007 FeyaSoft Corp. All Rights Reserved.
 */
package com.feyaSoft.plugin.util;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

import com.feyaSoft.home.base.HomeKey;

/**
 * @author Fenqiang Zhuang
 * @Apr 6, 2007
 * 
 * This file is used to return applicationContext based on different xml file
 */
public class AppContext {

	public static ApplicationContext getServiceAppContext() {
		// other way to get config locations

		String fileName = HomeKey.BASE_PATH + "/WEB-INF/home-services.xml";
		ApplicationContext ctx = new FileSystemXmlApplicationContext(fileName);
		return ctx;
	}

	public static ApplicationContext getDaoAppContext() {
		String fileName = HomeKey.BASE_PATH + "/WEB-INF/home-hibernate.xml";
		ApplicationContext ctx = new FileSystemXmlApplicationContext(fileName);
		return ctx;
	}

	public static ApplicationContext getMsgRseAppContext() {
		String fileName = HomeKey.BASE_PATH
				+ "/WEB-INF/careConn-msgResource.xml";
		ApplicationContext ctx = new FileSystemXmlApplicationContext(fileName);
		return ctx;
	}
}
